<?php
  //Genesis Software Manual - Page 16

$pdf->AddPage();
$pdf->Bookmark('D. Interrupt',1);
$pdf->Bookmark('1. Vertical Interrupt (V-INT)',2);
$pdf->Bookmark('2. Horizontal Interrupt (H-INT)',2);
//$pdf->Image('./Genesis/Gen-soft/Gsm-09.png',0,0,210 ,297);
//add_raster ($pdf);

$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('arial','',10);
$pdf->SetLineWidth(0.4);
set_text_space(4.4);

$edge = array
(
"MARGIN" => 36,
"BULLET" => 42,
"INSET_LIST" => 48,
"TAB2" => 85,
"TAB1" => 55,
"TAB3" => 60
);

$pdf->Text($edge["MARGIN"], new_line(33), "D. INTERRUPT");

$pdf->Text($edge["BULLET"], new_line(42), "There are three interrupts, Vertical, Horizontal, and External. You can contorl each interrupt by");
$pdf->Text($edge["BULLET"], new_line(), "the IE0, IE1, and IE2 bits in the VP registers. The interrupts use the AUTO-VECTOR mode");
$pdf->Text($edge["BULLET"], new_line(), "of the 68000 and are at levels 6, 4, and 2 respectively; the level 6 vertical interrupt having the");
$pdf->Text($edge["BULLET"], new_line(), "highest priority.");

$pdf->Text($edge["INSET_LIST"], new_line(64), "IE0 V Interrupt");
$pdf->Text($edge["TAB2"], current_line(), "(LEVEL 6)");
$pdf->Text($edge["INSET_LIST"], new_line(), "IE1 H Interrupt");
$pdf->Text($edge["TAB2"], current_line(), "(LEVEL 4)");
$pdf->Text($edge["INSET_LIST"], new_line(), "IE2 External Interrupt");
$pdf->Text($edge["TAB2"], current_line(), "(LEVEL 2)");
$pdf->Text($edge["TAB1"], new_line(), "1: Enable");
$pdf->Text($edge["TAB1"], new_line(), "0: Disable");


blist_new (1);

new_line (87);
blist_item (	$pdf,
		"VERTICAL INTERRUPT (V-INT)",
		"The vertical interrupt occurs just after V retrace.");


new_line (130);
blist_item (	$pdf,
		"HORIZONTAL INTERRUPT (H-INT)",
		"The Horizontal Interrupt occurs just before H retrace.");

$pdf->Text($edge["INSET_LIST"], new_line(174), "The VDP loads the required display information, including all required register values, for");
$pdf->Text($edge["INSET_LIST"], new_line(), "the line in about 36 clocks thus the CPU can control the display for the next line but not the");
$pdf->Text($edge["INSET_LIST"], new_line(), "line on which the interrupt occurs:");

$pdf->Text($edge["INSET_LIST"], new_line(229), "The horizontal interrupt is controlled by a line counter in register #10.");

$pdf->Text($edge["INSET_LIST"], new_line(239), "If this line cunter is changed at each interrupt, the desired spacing of interrupts may be");
$pdf->Text($edge["INSET_LIST"], new_line(), "achieved.");

$pdf->Text($edge["INSET_LIST"], new_line(251), "Thus:");
$pdf->Text($edge["TAB3"], current_line(), "If register #10 equals 00h, then the interrupt occurs every line.");
$pdf->Text($edge["TAB3"], new_line(), "If register #10 equals 01h, then the interrupt occurs every other line.");
$pdf->Text($edge["TAB3"], new_line(), "If register #10 equals 02h, then the interrupt occurs every third line.");

draw_level_chart ($pdf, 40, 100, 10, true,
	 40, "DISPLAY PERIOD",
	100, "V RETRACE",
	 10, ""
);

draw_little_arrow ($pdf, 82, 112); 
$pdf->CenterText (67, 118, "INTERRUPT POINT", 30);

draw_level_chart ($pdf, 40, 145, 10, true,
	 40, "DISPLAY PERIOD",
	100, "H RETRACE",
	 10, ""
);

draw_little_arrow ($pdf, 82, 159); 
$pdf->CenterText (67, 165, "INTERRUPT POINT", 30);
draw_little_arrow ($pdf, 162, 159); 
$pdf->CenterText (132, 165, "VDP FETCHES INFORMATION FOR THE LINE", 60);
$pdf->Line (82, 159, 162, 159);
center_text_white_line (82, 159, 162-82, "35 CPU CLOCK", 9);

$pdf->SetFont('arial', '', 8);
draw_level_chart ($pdf, 40, 190, 15, true,
	 10, "",
	 15, "H SYNC",
	 25, "H DISPLAY",
	 15, "RETRACE",
	 40, "",
	 15, "RETRACE",
	 30, ""
);

//Irregular Level Chart


draw_level ($pdf,  65, 210, 15, 10, true, "Change\nSettings");
draw_level ($pdf,  80, 200, 30, 20, false, "");
draw_level ($pdf, 110, 200, 5, 20, true, "", true);
center_mtext ($pdf, 120, 195, "MODIFIED\nH DISPLAY", 15);


draw_level ($pdf, 120, 210, 15, 10, true, "Change\nSettings");
draw_level ($pdf, 135, 200, 30, 20, false, "");
draw_level ($pdf, 165, 200, 5, 20, true, "", true);
center_mtext ($pdf, 175, 195, "MODIFIED\nH DISPLAY", 15);

draw_little_arrow ($pdf, 43, 212, 0.75); 
$pdf->CenterText (40, 217, "INT", 6);
draw_little_arrow ($pdf, 84, 212, 0.75); 
$pdf->CenterText (81, 217, "INT", 6);

add_footer($pdf,'02/21/92','9');

?>
